package com.smartum.mpr.model;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

public class News extends Identify {

	private static final long serialVersionUID = 1L;

	@JsonProperty("news_title")
	private String title;
	@JsonProperty("news_text")
	private String text;
	@JsonProperty("news_image")
	private NewsImage image;
	@JsonProperty("news_timestamp")
	private long timeStamp;
	@JsonIgnore
	private User owner;

	public News() {

	}

	public long getTimeStamp() {
		return timeStamp;
	}

	public void setTimeStamp(long timeStamp) {
		this.timeStamp = timeStamp;
	}

	public User getOwner() {
		return owner;
	}

	public void setOwner(User owner) {
		this.owner = owner;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public NewsImage getImage() {
		return image;
	}

	public void setImage(NewsImage image) {
		this.image = image;
	}

	@Override
	@JsonProperty("news_id")
	public Long getId() {
		return super.getId();
	}

	@Override
	@JsonProperty("news_id")
	public void setId(Long id) {
		super.setId(id);
	}

}
